home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0993sept.archive
/
000007_crash!cup.port….com!Politikill_Wed, 1 Sep 93 09:12:31 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
4KB
Received: by bkhouse.cts.com (V1.16/Amiga)
id AA00000; Wed, 1 Sep 93 09:12:31 PST
Received: from nova.unix.portal.com by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0oXgNr-0000neC; Tue, 31 Aug 93 17:49 PDT
Received: by nova.unix.portal.com (5.65b/4.1 1.425)
id AA14797; Tue, 31 Aug 93 17:53:19 -0700
Received: from hobo by portal.unix.portal.com (1.734)
id AA27148; Tue, 31 Aug 93 17:53:16 -0700
Received: by hobo.corp.portal.com (4.1/4.0.3 1.74)
id AA04249; Tue, 31 Aug 93 17:53:15 PDT
Return-Path: <Politikill@cup.portal.com>
Lines: 94
Date: Tue, 31 Aug 93 17:53:14 PDT
Message-Id: <9308311753.2.25589@cup.portal.com>
X-Origin: The Portal System (TM)
From: Politikill@cup.portal.com
To: AmigaE@bkhouse.cts.com
Subject: Object Help!
Don't worry, After September 9th you guyz won't have to worry about helping
me! :-)
I am now working on reading in 15 lines each with 5 different sections,
4 of which need to be stored in a global variable, and then NOT TOUCHED. I
am using an object right now...I was using an ARRAY OF LONG but that didn't
seem to work. What is happening is that the final line is being put into
where the previous lines information should be. Here is what I have
OBJECT user_object
usertext:LONG
usertype:LONG
usercomm:LONG
usermisc:LONG
ENDOBJECT
This is the object...I have fifteen (number of lines I need to read in)
global variables defined as user_pref1:user_object...user_pref15:user_object.
PROC getprefs()
DEF prefshandle,
inline[80]:STRING
IF (FileLength('ENV:EDS.cfg')=-1) THEN RETURN
IF (prefshandle:=Open('ENV:EDS.cfg',OLDFILE))=NIL THEN RETURN
WHILE ReadStr(prefshandle,inline)<>-1
IF (StrLen(inline)>1) THEN processprefs(inline)
ENDWHILE
Close(prefshandle)
ENDPROC
PROC processprefs(in)
DEF bar1,
bar2,
bar3,
bar4,
gadnum,
gadnumtmp[3]:STRING
bar1:=InStr(in,'|',0)
bar2:=InStr(in,'|',bar1+1)
bar3:=InStr(in,'|',bar2+1)
bar4:=InStr(in,'|',bar3+1)
MidStr(gadnumtmp,in,0,bar1)
gadnum:=Val(gadnumtmp,NIL)
MidStr(gadtxt,in,bar1+1,bar2-bar1-1)
MidStr(type,in,bar2+1,bar3-bar2-1)
MidStr(command,in,bar3+1,bar4-bar3-1)
MidStr(misc,in,bar4+1,ALL)
IF gadnum=1
user_pref1.usertext:=gadtxt
user_pref1.usertype:=type
user_pref1.usercomm:=command
user_pref1.usermisc:=misc
ENDIF
IF gadnum=2
user_pref2.usertext:=gadtxt
user_pref2.usertype:=type
user_pref2.usercomm:=command
user_pref2.usermisc:=misc
ENDIF
ENDPROC
getprefs() is called at startup, before I open my window, where
user_object.usertext for all 15 lines goes into the gadget text of 15
different gadgets. Then, when that gadget is selected, I am going to be
executing the command of TYPE DOS or AREXX with COMMAND whats being
executed, and MISC being the port for AREXX and ASL having an ASL requester
get a file to append to COMMAND for TYPE DOS, etc.
If you haven't guessed, this is for a config file (goes in ENV:) which for
now is only going to be edited with a seperate text editor. Here are two
example lines from the cfg file:
001|NewShell|DOS|Newshell CON:10/16/620/257/CustomShell/CLOSE/SCREENEDS|#
002|Jump2End|REXX|(move {sf})|JED.2
Also, if you are wondering, gadtxt...misc are being defined globally as
STRINGs as thats the only way I could get information out of the process at
all...HELP!
/ / /
/_/_/iZ
MODULE 'WiZkId'
PROC main()
wizkid.inetaddress:='Politikill@cup.portal.com'
wizkid.realname:='Jeffrey J Peden ]['
ENDPROC
*-- GammaTag Version 2.8 --*
*-- WOMEN = Wild Ovulating Man-Eating Nymphomaniacs